#define _CRT_SECURE_NO_WARNINGS
#pragma once
#include <stdio.h>
#include <memory.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>

#define AtomType int
typedef enum { HEAD, ATOM, CHILDLIST } ElemTag;

typedef struct GLNode {
	ElemTag tag;
	union 
	{
		AtomType atom;
		struct GLNode *hp;
	};
	struct GLNode *tp;
}GLNode;

typedef GLNode *GenList;